--- linux-5.8/3rdparty/rtl8723de/core/rtw_security.c
+++ linux-5.8/3rdparty/rtl8723de/core/rtw_security.c
@@ -33,6 +33,14 @@ static const char *_security_type_str[] = {
 	"BIP",
 };
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+struct sha256_state {
+        u64 length;
+        u32 state[8], curlen;
+        u8 buf[64];
+};
+#endif
+
 const char *security_type_str(u8 value)
 {
 #ifdef CONFIG_IEEE80211W
--- linux-5.8/3rdparty/rtl8723de/include/rtw_security.h
+++ linux-5.8/3rdparty/rtl8723de/include/rtw_security.h
@@ -246,11 +246,13 @@ struct security_priv {
 #endif /* DBG_SW_SEC_CNT */
 };
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
 struct sha256_state {
 	u64 length;
 	u32 state[8], curlen;
 	u8 buf[64];
 };
+#endif
 
 #define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
 	do {\
--- linux-5.8/3rdparty/rtl8723de/os_dep/linux/ioctl_cfg80211.c
+++ linux-5.8/3rdparty/rtl8723de/os_dep/linux/ioctl_cfg80211.c
@@ -5857,10 +5857,18 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
 #else
 	struct net_device *ndev,
 #endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+	struct mgmt_frame_regs *upd)
+#else
 	u16 frame_type, bool reg)
+#endif
 {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
 	struct net_device *ndev = wdev_to_ndev(wdev);
+#endif
+/* hardcoded always true, to make it pass compilation */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+        bool reg = true;
 #endif
 	_adapter *adapter;
 
@@ -5880,7 +5888,11 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
 	/* Wait QC Verify */
 	return;
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+        switch (upd->interface_stypes) {
+#else
 	switch (frame_type) {
+#endif
 	case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
 		SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
 		break;
@@ -6846,7 +6858,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
 	.mgmt_tx = cfg80211_rtw_mgmt_tx,
-	.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+	.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
+#else
+    .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
+#endif
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
 	.action = cfg80211_rtw_mgmt_tx,
 #endif
